package dao.univtype;

import java.util.List;

import vo.UnivtypeVO;

import com.ibatis.sqlmap.client.SqlMapClient;

public class UnivtypeDAOImpl implements UnivtypeDAO{

	private SqlMapClient sqlMapClient;

	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}

	@Override
	public List<UnivtypeVO> getUnivtypeList() throws Exception {
		return sqlMapClient.queryForList("univtype.getUnivtypeList");
	}

	@Override
	public void registerUnivtype(String univtype_name) throws Exception {
		sqlMapClient.insert("univtype.registerUnivtype", univtype_name);
	}

	@Override
	public void updateUnivtype(UnivtypeVO param) throws Exception {
		sqlMapClient.update("univtype.updateUnivtype", param);
	}

	@Override
	public void deleteUnivtype(int univtype_no) throws Exception {
		sqlMapClient.update("univtype.deleteUnivtype", univtype_no);
	}
}
